package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.FkwzUserQuestionAnswerMapper;
import com.ruoyi.system.domain.FkwzUserQuestionAnswer;
import com.ruoyi.system.service.IFkwzUserQuestionAnswerService;

/**
 * 检查问卷用户检查详情Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-11
 */
@Service
public class FkwzUserQuestionAnswerServiceImpl implements IFkwzUserQuestionAnswerService 
{
    @Autowired
    private FkwzUserQuestionAnswerMapper fkwzUserQuestionAnswerMapper;

    /**
     * 查询检查问卷用户检查详情
     * 
     * @param answerId 检查问卷用户检查详情主键
     * @return 检查问卷用户检查详情
     */
    @Override
    public FkwzUserQuestionAnswer selectFkwzUserQuestionAnswerByAnswerId(Long answerId)
    {
        return fkwzUserQuestionAnswerMapper.selectFkwzUserQuestionAnswerByAnswerId(answerId);
    }

    /**
     * 查询检查问卷用户检查详情列表
     * 
     * @param fkwzUserQuestionAnswer 检查问卷用户检查详情
     * @return 检查问卷用户检查详情
     */
    @Override
    public List<FkwzUserQuestionAnswer> selectFkwzUserQuestionAnswerList(FkwzUserQuestionAnswer fkwzUserQuestionAnswer)
    {
        return fkwzUserQuestionAnswerMapper.selectFkwzUserQuestionAnswerList(fkwzUserQuestionAnswer);
    }

    /**
     * 新增检查问卷用户检查详情
     * 
     * @param fkwzUserQuestionAnswer 检查问卷用户检查详情
     * @return 结果
     */
    @Override
    public int insertFkwzUserQuestionAnswer(FkwzUserQuestionAnswer fkwzUserQuestionAnswer)
    {
        fkwzUserQuestionAnswer.setCreateTime(DateUtils.getNowDate());
        return fkwzUserQuestionAnswerMapper.insertFkwzUserQuestionAnswer(fkwzUserQuestionAnswer);
    }

    /**
     * 修改检查问卷用户检查详情
     * 
     * @param fkwzUserQuestionAnswer 检查问卷用户检查详情
     * @return 结果
     */
    @Override
    public int updateFkwzUserQuestionAnswer(FkwzUserQuestionAnswer fkwzUserQuestionAnswer)
    {
        fkwzUserQuestionAnswer.setUpdateTime(DateUtils.getNowDate());
        return fkwzUserQuestionAnswerMapper.updateFkwzUserQuestionAnswer(fkwzUserQuestionAnswer);
    }

    /**
     * 批量删除检查问卷用户检查详情
     * 
     * @param answerIds 需要删除的检查问卷用户检查详情主键
     * @return 结果
     */
    @Override
    public int deleteFkwzUserQuestionAnswerByAnswerIds(Long[] answerIds)
    {
        return fkwzUserQuestionAnswerMapper.deleteFkwzUserQuestionAnswerByAnswerIds(answerIds);
    }

    /**
     * 删除检查问卷用户检查详情信息
     * 
     * @param answerId 检查问卷用户检查详情主键
     * @return 结果
     */
    @Override
    public int deleteFkwzUserQuestionAnswerByAnswerId(Long answerId)
    {
        return fkwzUserQuestionAnswerMapper.deleteFkwzUserQuestionAnswerByAnswerId(answerId);
    }
}
